# $Id: PKGBUILD 178947 2013-03-01 10:19:09Z andrea $
# Maintainer: Andrea Scarpino <andrea@archlinux.org>

pkgname=appmenu-qt
pkgver=0.2.6
pkgrel=4
pkgdesc="Allows Qt applications to export menus over DBus to a menu applet"
arch=('i686' 'x86_64')
url='https://launchpad.net/appmenu-qt'
license=('GPL')
depends=('libdbusmenu-qt')
makedepends=('cmake')
source=("http://launchpad.net/${pkgname}/trunk/${pkgver}/+download/${pkgname}-${pkgver}.tar.bz2"{,.asc}
        'appmenu-async.diff')
md5sums=('90cce750e5412d43ce075b0a9bdb6782'
         'de499d01369fc85040f5bbfc53ae1700'
         '5db00ca92274c8b1797c204321961189')

build() {
  . /etc/profile.d/qt4.sh

  # FS#33286
  cd ${pkgname}-${pkgver}
  patch -p0 -i "${srcdir}"/appmenu-async.diff
  cd ../

  mkdir build
  cd build
  cmake ../${pkgname}-${pkgver} \
    -DCMAKE_INSTALL_PREFIX=/usr \
    -DCMAKE_BUILD_TYPE=Release
  make
}

package() {
  cd build
  make DESTDIR="${pkgdir}" install
}
